#include<bits/stdc++.h>
using namespace std;
const int maxn=40;
int a[maxn+10]={0,1,1};
int main()
{
	int n,i;
	cin>>n;
	for(i=3;i<=n;i++)
	a[i]=a[i-1]+a[i-2];
	cout<<a[n];
    return 0;
}
